package com.ywh.hilttest.test4

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.android.components.ActivityComponent

@Module
@InstallIn(ActivityComponent::class)
abstract class EngineModule {

    @BindsCarEngine
    @Binds
    abstract fun getCar(carEngine: CarEngine): Engine

    @BindsTrainEngine
    @Binds
    abstract fun getTrain(trainEngine: TrainEngine): Engine
}